from flask import Flask, jsonify
from db import db1
from Config import Config
from flask_cors import CORS
from day01 import bp_day01

app = Flask(__name__)
CORS(app)
app.config.from_object(Config)
app.register_blueprint(bp_day01,url_prefix='/day01')


@app.route('/test')
def test():
    sql = 'select * from people'
    res = db1.findall(sql)
    return jsonify({'list': res})


if __name__ == '__main__':
    app.run()
